<%@page import="java.util.Date"%>
<%@page import="com.mongodb.DBObject"%>
<%@page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
<%@page import="net.tanesha.recaptcha.ReCaptcha"%>
<%
DBObject object = (DBObject) request.getAttribute("object");
%>

<jsp:include page="layout/header.jsp">
	<jsp:param name="title" value="Contact" />
	<jsp:param name="description" value="" />
	<jsp:param name="keywords" value="" />
	<jsp:param name="link" value="" />
</jsp:include>	

<div id="content">
        	<div id="content_inner">
            	<div id="maincontent">
                    <div id="contact" class="clearafter">                    	
                        <h2 class="title">Invoice</h2>
                        <div id="userform" class="contactform">
                            <%
                            if(object!=null)
                            {
                            %>
                            <table>
                            	<tr>
                            		<td style="font-weight: bold;background: #CCC" colspan="2">Payment information</td>
                            	</tr>
                            	<tr>
                            		<td width="400">Date</td>
                            		<td><%=object.get("date") %></td>
                            	</tr>
                            	<tr>
                            		<td>Invoice</td>
                            		<td><%=object.get("invoice") %></td>
                            	</tr>
                            	<tr>
                            		<td>Price</td>
                            		<td>$<%=object.get("mc_gross") %></td>
                            	</tr>
                            	<tr>
                            		<td style="font-weight: bold;background: #CCC" colspan="2">Customer</td>
                            	</tr>
                            	<tr>
                            		<td>First name</td>
                            		<td><%=object.get("first_name") %></td>
                            	</tr>
                            	<tr>
                            		<td>Last name</td>
                            		<td><%=object.get("last_name") %></td>
                            	</tr>
                            	<tr>
                            		<td>Payer email</td>
                            		<td><%=object.get("payer_email") %></td>
                            	</tr>
                            	<tr>
                            		<td>Payer id</td>
                            		<td><%=object.get("payer_id") %></td>
                            	</tr>
                            	<tr>
                            		<td>First name</td>
                            		<td><%=object.get("first_name") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address name</td>
                            		<td><%=object.get("address_name") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address country</td>
                            		<td><%=object.get("address_country") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address country code</td>
                            		<td><%=object.get("address_country_code") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address zip</td>
                            		<td><%=object.get("address_zip") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address state</td>
                            		<td><%=object.get("address_state") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address city</td>
                            		<td><%=object.get("address_city") %></td>
                            	</tr>
                            	<tr>
                            		<td>Address street</td>
                            		<td><%=object.get("address_street") %></td>
                            	</tr>
                            	<tr>
                            		<td style="font-weight: bold;background: #CCC" colspan="2">Seller</td>
                            	</tr>
                            	<tr>
                            		<td>Business Name</td>
                            		<td>hatforrent</td>
                            	</tr>
                            	<tr>
                            		<td style="font-weight: bold;background: #CCC" colspan="2">Product</td>
                            	</tr>
                            	
                            	<%
                            		String[] arr = object.get("blog").toString().split("\\|");
                            		for(int i=1;i<arr.length;i++)
                            		{
                            	%>
                            	<tr>
                            		<%
                            			String[] sp = arr[i].split(",");
                            		%>
                            		<td><%=sp[0] %></td>
                            		<td><b>Date:</b> <%=new Date(Long.parseLong(sp[1])) %> | <b>Renew:</b> <%=new Date(Long.parseLong(sp[2])) %></td>
                            	</tr>
                            	<%
                            		}
                            	%>
                            </table>
                            
                            <%
                            }
                            %>
                        </div>
                    </div>                    
                </div>
            </div>
        </div>
        
<%@ include file='/layout/footer.jsp'%>          